HES 505 Fall 2022: Session 19
By the end of today you should be able to:
Recognize the link between regression analysis and overlay analysis
Generate spatial predictions based on regression analysis
Extend logistic regression to presence-only data models
\[ \begin{equation} F(\mathbf{s}) = \prod_{M=1}^{m}X_m(\mathbf{s}) \end{equation} \]
\[ \begin{equation} F(\mathbf{s}) = f(w_1X_1(\mathbf{s}), w_2X_2(\mathbf{s}), w_3X_3(\mathbf{s}), ..., w_mX_m(\mathbf{s})) \end{equation} \]
\(F(\mathbf{s})\) does not have to be binary (could be ordinal or continuous)
\(X_m(\mathbf{s})\) could also be extended beyond simply ‘suitable/not suitable’
Adding weights allows incorporation of relative importance
Other functions for combining inputs (\(X_m(\mathbf{s})\))
\[ \begin{equation} F(\mathbf{s}) = \frac{\sum_{i=1}^{m}w_iX_i(\mathbf{s})}{\sum_{i=1}^{m}w_i} \end{equation} \]
\(F(s)\) is now an index based of the values of \(X_m(\mathbf{s})\)
\(w_i\) can incorporate weights of evidence, uncertainty, or different participant preferences
Dividing by \(\sum_{i=1}^{m}w_i\) normalizes by the sum of weights
\[ \begin{equation} F(\mathbf{s}) = w_0 + \sum_{i=1}^{m}w_iX_i(\mathbf{s}) + \epsilon \end{equation} \]
If we estimate \(w_i\) using data, we specify \(F(s)\) as the outcome of regression
When \(F(s)\) is binary → logistic regression
When \(F(s)\) is continuous → linear (gamma) regression
When \(F(s)\) is discrete → Poisson regression
Assumptions about \(\epsilon\) matter!!
To identify important correlations between predictors and the occurrence of an event
Generate maps of the ‘range’ or ‘niche’ of events
Understand spatial patterns of event co-occurrence
Forecast changes in event distributions
From Long
Spatially referenced locations of events \((\mathbf{y})\) sampled from the study extent
A matrix of predictors \((\mathbf{X})\) that can be assigned to each event based on spatial location
Goal: Estimate the probability of occurrence of events across unsampled regions of the study area based on correlations with predictors
Random or systematic sample of the study region
The presence (or absence) of the event is recorded for each point
Hypothesized predictors of occurrence are measured (or extracted) at each point
We can model favorability as the probability of occurrence using a logistic regression
A link function maps the linear predictor \((\mathbf{x_i}'\beta + \alpha)\) onto the support (0-1) for probabilities
Estimates of \(\beta\) can then be used to generate ‘wall-to-wall’ spatial predictions
\[ \begin{equation} y_{i} \sim \text{Bern}(p_i)\\ \text{link}(p_i) = \mathbf{x_i}'\beta + \alpha \end{equation} \]
Inputs from the dismo package
The sample data
Building our dataframe
Building our dataframe
Looking at correlations
Looking at correlations
Fitting some models
pts.df <- cbind(pts.df, pres.abs$y)
colnames(pts.df)[8] <- "y"
logistic.global <- glm(y~., family=binomial(link="logit"), data=pts.df[,2:8])
logistic.simple <- glm(y ~ MeanAnnTemp + TotalPrecip, family=binomial(link="logit"), data=pts.df[,2:8])
logistic.rich <- glm(y ~ MeanAnnTemp + PrecipWetQuarter + PrecipDryQuarter, family=binomial(link="logit"), data=pts.df[,2:8])Checking out the results
Checking out the results
Checking out the results
Comparing models
Generating predictions
Generating predictions
Generating predictions
Generating predictions
Dependent variable must be binary
Observations must be independent (important for spatial analyses)
Predictors should not be collinear
Predictors should be linearly related to the log-odds
Sample Size
Opportunistic collection of presences only
Hypothesized predictors of occurrence are measured (or extracted) at each presence
Background points (or pseudoabsences) generated for comparison
What constitutes background?
Not measuring probability, but relative likelihood of occurrence
Sampling bias affects estimation
The intercept
\[ \begin{equation} y_{i} \sim \text{Bern}(p_i)\\ \text{link}(p_i) = \mathbf{x_i}'\beta + \alpha \end{equation} \]
Poisson Point Process Models model location (not \(y\))
Number of points expected is given by a rate \(\lambda\)
Model \(\lambda\) using Poisson regression